package com.last.entity;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

/**
 *  统一定义 返回码和返回信息
 * @author 49293
 */

@AllArgsConstructor
@NoArgsConstructor
public enum ResponseEnum {
    /**
     *
     */
    SUCCESS(200,"成功"),
    RECHARGE_WAIT(200,"充值中，请稍等"),
    USER_NOT_FOUND(301,"用户名不存在"),
    USERNAME_OR_PASSWORD_WRONG(302,"用户名或者密码错误"),
    NOT_ENOUGH_MONEY(303,"余额不足"),
    MONEY_LOCK(304,"您修改的账户已经被别人改过，请重新再试"),
    MONEY_PRAM_ERROR(305,"金额参数有误"),
    OSS_ERROR(306,"文件上传失败"),
    OSS_ERROR_QINIU(307,"七牛云出了问题"),
    MSM_ERROR(308,"短信发送失败"),
    PHONE_ERROR(410,"手机号已被注册"),
    SYSTEM_ERROR(500,"服务器错误"),
    DB_ERROR(501,"数据库异常"),
    NETWORK_ABNORMALITY(502,"服务器连接超时"),
    CHARM_SERVER_ERROR(503,"数据库服务问题"),
    PARAMETER_EXCEPTION(504,"参数异常"),
    DELETE_GOODS_TYPE_FAIL(701,"商品类别正在被使用，无法删除"),
    TOKEN_WRONG(600,"token有误"),
    ADDRESS_NOT_FOUND(601,"请添加地址"),
    ADDRESS_UPDATE_ERROR(602,"修改地址失败"),
    USER_DETAIL_NO_FOUND(603,"无法查到用户详情"),
    UPDATE_USER_DETAIL_FAIL(604,"修改用户详情表失败"),
    ORDERS_WRONG(605,"订单为空或异常"),
    ORDERS_NO_FOUND(606,"订单号不存在"),
    UPDATE_ORDERS_FAIL(607,"修改订单信息失败"),
    COLLECT_WRONG(608,"收藏为空或异常"),
    COLLECT_NO_FOUND(609,"收藏id不正确"),
    USER_ERROR(610,"不存在此用户"),
    NOT_ROOT(612,"非管理员不能登录"),
    NOT_COMMON(613,"此为用户登录接口，管理员请点击管理员登录接口"),
    USER_PASSWORD_WRONG(611,"新密码不能与旧密码一致"),
    EXT_ERROR(612,"类型错误，只接受xlsx格式"),
    UPDATE_MONEY_ERROR(618,"金钱修改失败"),
    COUPON_NO_FOUND(614,"还没有优惠卷"),
    COUPON_NUM_NOT(615,"优惠卷数量不够"),
    PAY_PASSWORD_WRONG(616,"支付密码有误"),
    PHONE_OR_MSM_CODE_ERROR(617,"手机号或短信验证码错误"),
    GIFT_NUM_ERROR(1000,"礼物的数量不合法"),
    LOCK_CHARM_VALUE(1001,"修改魅力值锁"),
    NO_SUCH_TYPE(1201,"没有该类型"),
    SERVER_NUM_ERROR(1202,"接单排行榜异常"),
    ORDER_OUT_TIME(1203,"订单超时"),
    GIFT_ID_ERROR(1002,"礼物id有误"),
    CHARM_VALUE_ERROR(1003,"魅力值有问题"),
    GIVING_GIFT_HYSTRIX(2000,"送礼物服务触发熔断"),
    GIVING_GIFT_MQ_ERROR(1004,"添加流水消息队列出错"),
    INSUFFICIENT_BALANCE(1204,"余额不足"),
    PAYMENT_FAILED(1205,"支付失败")
    ;


    private Integer code;
    private String msg;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
